#ifndef FRUITS_H
#define FRUITS_H
/**
 * fruits.h
 * This holds the different values for the
 * fruit type nutrition_fields in coolinary.h
 */

#include "table.h"
#include "coolinary.h"

#define MAX 101
/**
 * Fruit descriptions
 */

void addFruits(table* f_table)
{

struct nutrition_fields f_apple = {
    	.calories = 130,
	.protein = 1,
	.sugar = 25,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 3
};

cooltype apple = {
	.name = "apple",
	.type = "fruit",
	.nutrition = 30,
	.nutrition_values = f_apple,
	.quantity = 1,
	.time = 0

};


struct nutrition_fields f_avocado = {
    	.calories = 50,
	.protein = 1,
	.sugar = 0,
	.fat = 35,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 4
};

cooltype avocado = {
	.name = "avocado",
	.type = "fruit",
	.nutrition = 30,
	.nutrition_values = f_avocado,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_banana = {
    	.calories = 110,
	.protein = 1,
	.sugar = 19,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 15
};

cooltype banana = {
	.name = "banana",
	.type = "fruit",
	.nutrition = 45,
	.nutrition_values = f_banana,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_cantaloupe = {
    	.calories = 50,
	.protein = 1,
	.sugar = 11,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 120,
	.vitamin_c = 80
};

cooltype cantaloupe = {
	.name = "cantaloupe",
	.type = "fruit",
	.nutrition = 25,
	.nutrition_values = f_cantaloupe,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_grapefruit = {
    	.calories = 60,
	.protein = 1,
	.sugar = 11,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 35,
	.vitamin_c = 100
};

cooltype grapefruit = {
	.name = "grapefruit",
	.type = "fruit",
	.nutrition = 42,
	.nutrition_values = f_grapefruit,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_grapes = {
    	.calories = 90,
	.protein = 0,
	.sugar = 20,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 2
};

cooltype grapes = {
	.name = "grapes",
	.type = "fruit",
	.nutrition = 25,
	.nutrition_values = f_grapes,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_hmelon = {
    	.calories = 50,
	.protein = 1,
	.sugar = 11,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 45
};

cooltype honeydew = {
	.name = "Honeydew Melon",
	.type = "fruit",
	.nutrition = 30,
	.nutrition_values = f_hmelon,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_kiwi = {
    	.calories = 90,
	.protein = 1,
	.sugar = 13,
	.fat = 10,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 240
};

cooltype kiwi = {
	.name = "kiwi",
	.type = "fruit",
	.nutrition = 48,
	.nutrition_values = f_kiwi,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_lemon = {
    	.calories = 15,
	.protein = 0,
	.sugar = 2,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 40
};

cooltype lemon = {
	.name = "lemon",
	.type = "fruit",
	.nutrition = 20,
	.nutrition_values = f_lemon,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_orange = {
    	.calories = 80,
	.protein = 1,
	.sugar = 14,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 130
};

cooltype orange = {
	.name = "orange",
	.type = "fruit",
	.nutrition = 40,
	.nutrition_values = f_orange,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_pear = {
    	.calories = 100,
	.protein = 1,
	.sugar = 16,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 10
};

cooltype pear = {
	.name = "pear",
	.type = "fruit",
	.nutrition = 15,
	.nutrition_values = f_pear,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_pineapple = {
    	.calories = 50,
	.protein = 1,
	.sugar = 10,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 50
};

cooltype pineapple = {
	.name = "pineapple",
	.type = "fruit",
	.nutrition = 25,
	.nutrition_values = f_pineapple,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_strawberry = {
    	.calories = 50,
	.protein = 1,
	.sugar = 8,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 160
};

cooltype strawberry = {
	.name = "strawberry",
	.type = "fruit",
	.nutrition = 30,
	.nutrition_values = f_strawberry,
	.quantity = 1,
	.time = 0

};
struct nutrition_fields f_watermelon = {
    	.calories = 130,
	.protein = 1,
	.sugar = 25,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 2,
	.vitamin_c = 3
};

cooltype watermelon = {
	.name = "watermelon",
	.type = "fruit",
	.nutrition = 15,
	.nutrition_values = f_watermelon,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_water = {
    	.calories = 0,
	.protein = 0,
	.sugar = 0,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 0
};

cooltype water = {
	.name = "water",
	.type = "water",
	.nutrition = 25,
	.nutrition_values = f_water,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_milk = {
    	.calories = 102,
	.protein = 8,
	.sugar = 13,
	.fat = 2,
	.cholesterol = .012,
	.vitamin_a = 10,
	.vitamin_c = 0
};

cooltype milk = {
	.name = "milk",
	.type = "dairy",
	.nutrition = 25,
	.nutrition_values = f_water,
	.quantity = 1,
	.time = 0

};


//void init_fruit_table(table f_table){
 //   	f_table = table_init(MAX);
    int varsz = sizeof(cooltype);
	table_insert(*f_table,"apple", FGROUP, &apple, varsz);
	table_insert(*f_table,"avocado", FGROUP, &avocado, varsz);
	table_insert(*f_table,"banana", FGROUP, &banana, varsz);
	table_insert(*f_table,"cantaloupe", FGROUP, &cantaloupe, varsz);
	table_insert(*f_table,"grapefruit", FGROUP, &grapefruit, varsz);
	table_insert(*f_table,"grapes", FGROUP, &grapes, varsz);
	table_insert(*f_table,"honeydew", FGROUP, &honeydew, varsz);
	table_insert(*f_table,"kiwi", FGROUP, &kiwi, varsz);
	table_insert(*f_table,"lemon", FGROUP, &lemon, varsz);
	table_insert(*f_table,"orange", FGROUP, &orange, varsz);
	table_insert(*f_table,"pear", FGROUP, &pear, varsz);
	table_insert(*f_table,"pineapple", FGROUP, &pineapple, varsz);
	table_insert(*f_table,"strawberry", FGROUP, &strawberry, varsz);
	table_insert(*f_table,"watermelon", FGROUP, &watermelon, varsz);
	table_insert(*f_table,"water", FGROUP, &water, varsz);
	table_insert(*f_table,"milk", FGROUP, &milk, varsz);

}

#endif
